<template>
  <a-icon :component="svgComponent"></a-icon>
</template>

<script>
export default {
  name: 'SvgIcon',
  props: {
    type: {
      type: String,
      required: true
    }
  },
  data () {
    return {
    // path固定写法  加载 /assets/icons/svg/*.svg
      svgComponent: () => import('@/assets/icons/svg/' + this.type + '.svg?inline')
    }
  }
}
</script>

<style>
</style>
